﻿using Furion.DynamicApiController;
using HOPU.OnlineSchool.Application.Subject.Dto;
using HOPU.OnlineSchool.Application.Subject.Services;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HOPU.OnlineSchool.Application.Subject
{
    /// <summary>
    /// 课程管理
    /// </summary>
   public class SubjectAppService: IDynamicApiController
    {
        private readonly ISubjectService _subjectService;

        public SubjectAppService(ISubjectService subjectService)
        {
            _subjectService = subjectService;
        }
        /// <summary>
        /// 获取课程分类
        /// </summary>
        /// <returns></returns>
        public async Task<List<SubjectTreeDto>> Get() {
         var list= await _subjectService.GetTreeListAsync();
            return list;

        }
    }
}
